<%@page import="com.vietnam.power.util.CKConfiguration"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor"%>
<!-- Content Header (Page header) -->
<section class="content-header no-margin">
	<h1 class="text-center">
		<spring:message code="admin.message.mailbox" />
	</h1>
</section>

<!-- Main content -->
<section class="content">
	<!-- MAILBOX BEGIN -->
	<div class="mailbox row">
		<div class="col-xs-12">
			<div class="box box-solid">
				<div class="box-body">
					<div class="row">
						<div class="col-md-3 col-sm-4">
							<!-- BOXES are complex enough to move the .box-header around.
                                                 This is an example of having the box header within the box body -->
							<div class="box-header">
								<i class="fa fa-inbox"></i>
								<h3 class="box-title">
									<c:choose>
										<c:when test="${param.mode=='INBOX'}">
											<spring:message code="admin.message.inbox" />
										</c:when>
										<c:when test="${param.mode=='SENT'}">
											<spring:message code="admin.message.sent" />
										</c:when>
										<c:when test="${param.mode=='TRASH'}">
											<spring:message code="admin.message.trash" />
										</c:when>
									</c:choose>
								</h3>
							</div>
							<!-- compose message btn -->
							<a class="btn btn-block btn-primary" data-toggle="modal"
								data-target="#compose-modal"><i class="fa fa-pencil"></i> <spring:message
									code="admin.message.compose" /></a>
							<!-- Navigation - folders-->
							<div style="margin-top: 15px;">
								<ul class="nav nav-pills nav-stacked">
									<li class="header"><spring:message
											code="admin.message.folders" /></li>
									<li <c:if test="${param.mode=='INBOX'}">class="active" </c:if>><a
										href="getMailBox.html?mode=INBOX"><i class="fa fa-inbox"></i>
											<spring:message code="admin.message.inbox" /> (<span
											id="newMail"></span>)</a></li>
									<!-- <li><a href="#"><i class="fa fa-pencil-square-o"></i> Drafts</a></li> -->
									<li <c:if test="${param.mode=='SENT'}">class="active" </c:if>><a
										href="getMailBox.html?mode=SENT"><i
											class="fa fa-mail-forward"></i> <spring:message
												code="admin.message.sent" /></a></li>
									<!-- <li><a href="#"><i class="fa fa-star"></i> Starred</a></li> -->
									<li <c:if test="${param.mode=='TRASH'}">class="active" </c:if>><a
										href="getMailBox.html?mode=TRASH"><i class="fa fa-trash-o"></i>
											<spring:message code="admin.message.trash" /></a></li>
								</ul>
							</div>
						</div>
						<!-- /.col (LEFT) -->
						<div class="col-md-9 col-sm-8">
							<!-- COMPOSE MESSAGE MODAL -->
							<div>
								<form>
									<div class="modal-body">
										<div class="form-group">
											<div class="input-group">
												<span class="input-group-addon"><spring:message
														code="admin.message.from" />:</span> <input
													value="${message.from}" class="form-control"
													disabled="disabled">
											</div>
										</div>
										<div class="form-group">
											<div class="input-group">
												<span class="input-group-addon"><spring:message
														code="admin.message.to" />:</span> <input value="${message.to}"
													class="form-control" disabled="disabled">
											</div>
										</div>
										<div class="form-group">
											<div class="input-group">
												<span class="input-group-addon"><spring:message
														code="admin.message.cc" />:</span> <input value="${message.cc}"
													class="form-control" disabled="disabled">
											</div>
										</div>
										<div class="form-group">
											<div class="input-group">
												<span class="input-group-addon"><spring:message
														code="admin.message.subject" />:</span> <input
													value="${message.subject}" class="form-control"
													disabled="disabled">
											</div>
										</div>
										<div class="form-group">
											<textarea class="form-control" id="content1"
												style="height: 120px;" disabled="disabled">${message.content}</textarea>
											<ckeditor:replace replace="content1"
												basePath="/e-shop/admin/ckeditor/"
												config="<%=CKConfiguration.createConfig()%>" />
										</div>
										<%-- <div class="form-group">
											<div class="btn btn-success btn-file">
												<i class="fa fa-paperclip"></i>
												<spring:message code="admin.message.attachment" />
												<input type="file" name="attachment" />
											</div>
										</div> --%>
									</div>
									<div class="modal-footer clearfix">
										<button type="button" class="btn btn-danger"
											onclick="history.back(1);">
											<i class="fa fa-times"></i>
											<spring:message code="admin.form.dialog.button.close" />
										</button>
										<c:if test="${param.mode=='INBOX'}">
											<button type="button" class="btn btn-primary pull-left"
												data-toggle="modal" data-target="#compose-modal"
												onclick="flag=true;return false;">
												<i class="fa fa-envelope"></i>
												<spring:message code="admin.message.reply" />
											</button>
										</c:if>
									</div>
								</form>
							</div>
							<!-- /.modal -->
						</div>
						<!-- /.col (RIGHT) -->
					</div>
					<!-- /.row -->
				</div>
			</div>
			<!-- /.box -->
		</div>
		<!-- /.col (MAIN) -->
	</div>
	<!-- MAILBOX END -->
</section>
<!-- /.content -->